﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfApp_91
{
    /// <summary>
    /// Lógica de interacción para Login.xaml
    /// </summary>
    public partial class Login : Window
    {
        public Login()
        {
            InitializeComponent();
        }

        private void btnIngresar1_Click(object sender, RoutedEventArgs e)
        {
            

            string user = txtUser.Text;
            string pass = txtPass.Password;
            string estado = "1";
            if (acceso.operaciones.Operacion_general("UPDATE login SET Estado = '" + estado + "'  WHERE User = '"+user+"' and Pass = '" + pass + "' "))
            
            {
                SoccerAlameda frm = new SoccerAlameda();
                frm.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("No registrado");
            }
        }
    }
}
